<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no">
  <meta name="description" content="API docs for the V2TimValueCallback.fromJson constructor from Class V2TimValueCallback from the v2_tim_value_callback library, for the Dart programming language.">
  <title>V2TimValueCallback.fromJson constructor - V2TimValueCallback - v2_tim_value_callback library - Dart API</title>


  
  <link rel="preconnect" href="https://fonts.gstatic.com">
  <link href="https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,300;0,400;0,500;0,700;1,400&display=swap" rel="stylesheet">
  <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" rel="stylesheet">
  
  <link rel="stylesheet" href="../../static-assets/github.css?v1">
  <link rel="stylesheet" href="../../static-assets/styles.css?v1">
  <link rel="icon" href="../../static-assets/favicon.png?v1">

  
</head>


<body data-base-href="../../" data-using-base-href="false" class="light-theme">

<div id="overlay-under-drawer"></div>

<header id="title">
  <span id="sidenav-left-toggle" class="material-symbols-outlined" role="button" tabindex="0">menu</span>
  <ol class="breadcrumbs gt-separated dark hidden-xs">
    <li><a href="../../index.html">tencent_cloud_chat_sdk</a></li>
    <li><a href="../../web_compatible_models_v2_tim_value_callback/web_compatible_models_v2_tim_value_callback-library.html">web&#47;compatible_models&#47;v2_tim_value_callback.dart</a></li>
    <li><a href="../../web_compatible_models_v2_tim_value_callback/V2TimValueCallback-class.html">V2TimValueCallback<span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></a></li>
    <li class="self-crumb">V2TimValueCallback.fromJson constructor</li>
  </ol>
  <div class="self-name">V2TimValueCallback.fromJson</div>
  <form class="search navbar-right" role="search">
    <input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
  <div class="toggle" id="theme-button" title="Toggle brightness">
    <label for="theme">
      <input type="checkbox" id="theme" value="light-theme">
      <span id="dark-theme-button" class="material-symbols-outlined">
        dark_mode
      </span>
      <span id="light-theme-button" class="material-symbols-outlined">
        light_mode
      </span>
    </label>
  </div>
</header>
<main>

  <div
      id="dartdoc-main-content"
      class="main-content"
      data-above-sidebar="web_compatible_models_v2_tim_value_callback&#47;V2TimValueCallback-class-sidebar.html"
      data-below-sidebar="">
      <div>
<h1><span class="kind-constructor">V2TimValueCallback&lt;<wbr><span class="type-parameter">T</span>&gt;.fromJson</span> constructor 
</h1></div>

    <section class="multi-line-signature">
      
      <span class="name ">V2TimValueCallback&lt;<wbr><span class="type-parameter">T</span>&gt;.fromJson</span>(<wbr><ol class="parameter-list"><li><span class="parameter" id="fromJson-param-json"><span class="type-annotation"><a href="https://api.flutter.dev/flutter/dart-core/Map-class.html">Map</a></span> <span class="parameter-name">json</span></span></li>
</ol>)
    </section>

    


    
<section class="summary source-code" id="source">
  <h2><span>Implementation</span></h2>
  <pre class="language-dart"><code class="language-dart">V2TimValueCallback.fromJson(Map json) {
  json = Utils.formatJson(json);
  late dynamic fromJsonData;
  if (json[&#39;data&#39;] == null) {
    fromJsonData = data;
  } else {
    if (T == V2TimMessage) {
      fromJsonData = V2TimMessage.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2TimUserFullInfo) {
      fromJsonData = V2TimUserFullInfo.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == _getT&lt;List&lt;V2TimUserFullInfo&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimUserFullInfo.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimGroupInfo&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimGroupInfo.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimGroupInfoResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimGroupInfoResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;Map&lt;String, String&gt;&gt;()) {
      fromJsonData = Map&lt;String, String&gt;.from(json[&#39;data&#39;]) as T;
    } else if (T == _getT&lt;Map&lt;String, int&gt;&gt;()) {
      fromJsonData = Map&lt;String, int&gt;.from(json[&#39;data&#39;]) as T;
    } else if (T == V2TimGroupMemberInfoResult) {
      fromJsonData = V2TimGroupMemberInfoResult.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == _getT&lt;List&lt;V2TimGroupMemberFullInfo&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimGroupMemberFullInfo.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimGroupMemberOperationResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimGroupMemberOperationResult.fromJson(e);
      }).toList() as T;
    } else if (T == V2TimGroupApplicationResult) {
      fromJsonData = V2TimGroupApplicationResult.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2TimReceiveMessageOptInfo) {
      fromJsonData = V2TimReceiveMessageOptInfo.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2TimConversationResult) {
      fromJsonData = V2TimConversationResult.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2TimConversation) {
      fromJsonData = V2TimConversation.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == _getT&lt;List&lt;V2TimFriendInfo&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimFriendInfo.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimFriendInfoResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimFriendInfoResult.fromJson(e);
      }).toList() as T;
    } else if (T == V2TimFriendOperationResult) {
      fromJsonData = V2TimFriendOperationResult.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == _getT&lt;List&lt;V2TimFriendOperationResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimFriendOperationResult.fromJson(e);
      }).toList() as T;
    } else if (T == V2TimFriendCheckResult) {
      fromJsonData = V2TimFriendCheckResult.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2TimConversationOperationResult) {
      fromJsonData = V2TimConversationOperationResult.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == _getT&lt;List&lt;V2TimFriendCheckResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimFriendCheckResult.fromJson(e);
      }).toList() as T;
    } else if (T == V2TimFriendApplicationResult) {
      fromJsonData = V2TimFriendApplicationResult.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == _getT&lt;List&lt;V2TimFriendGroup&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimFriendGroup.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimMessage&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimMessage.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimOfficialAccountInfoResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimOfficialAccountInfoResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimMessageExtensionResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimMessageExtensionResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimMessageExtension&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimMessageExtension.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimConversation&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimConversation.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimReceiveMessageOptInfo&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimReceiveMessageOptInfo.fromJson(e);
      }).toList() as T;
    } else if (T == V2TimMessageSearchResult) {
      fromJsonData = V2TimMessageSearchResult.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2GroupMemberInfoSearchResult) {
      fromJsonData = V2GroupMemberInfoSearchResult.fromJson(json[&#39;data&#39;]); &#47;&#47; V2TimSignalingInfo
    } else if (T == V2TimSignalingInfo) {
      fromJsonData = V2TimSignalingInfo.fromJson(json[&#39;data&#39;]);
    } else if (T == V2TimMessageListResult) {
      fromJsonData = V2TimMessageListResult.fromJson(json[&#39;data&#39;]);
    } else if (T == V2TimMessageOnlineUrl) {
      fromJsonData = V2TimMessageOnlineUrl.fromJson(json[&#39;data&#39;]);
    } else if (T == V2TimMessageChangeInfo) {
      fromJsonData = V2TimMessageChangeInfo.fromJson(json[&#39;data&#39;]);
    } else if (T == V2TimMsgCreateInfoResult) {
      fromJsonData = V2TimMsgCreateInfoResult.fromJson(json[&#39;data&#39;]);
    } else if (T == V2TimUserInfoResult) {
      fromJsonData = V2TimUserInfoResult.fromJson(json[&#39;data&#39;]);
    } else if (T == V2TimGroupMessageReadMemberList) {
      fromJsonData = V2TimGroupMessageReadMemberList.fromJson(json[&#39;data&#39;]);
    } else if (T == _getT&lt;List&lt;V2TimMessageReceipt&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimMessageReceipt.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimPermissionGroupInfoResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimPermissionGroupInfoResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimTopicInfoResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimTopicInfoResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimFollowOperationResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimFollowOperationResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimTopicOperationResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimTopicOperationResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimGroupInfo&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimGroupInfo.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimUserStatus&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimUserStatus.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimMessageReactionResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimMessageReactionResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimConversationOperationResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimConversationOperationResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimFollowInfo&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimFollowInfo.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimFollowTypeCheckResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimFollowTypeCheckResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimPermissionGroupMemberOperationResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimPermissionGroupMemberOperationResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimPermissionGroupOperationResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimPermissionGroupOperationResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;V2TimTopicPermissionResult&gt;&gt;()) {
      fromJsonData = (json[&#39;data&#39;] as List).map((e) {
        return V2TimTopicPermissionResult.fromJson(e);
      }).toList() as T;
    } else if (T == _getT&lt;List&lt;String&gt;&gt;()) {
      fromJsonData = List.from(json[&quot;data&quot;]).map((e) =&gt; e.toString()).toList();
    } else if (T == V2TimConversationFilter) {
      fromJsonData = V2TimConversationFilter.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2TimReceiveMessageOptInfo) {
      fromJsonData = V2TimReceiveMessageOptInfo.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2TimMessageReactionResult) {
      fromJsonData = V2TimMessageReactionResult.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2TimMessageReactionUserResult) {
      fromJsonData = V2TimMessageReactionUserResult.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2TimFollowInfo) {
      fromJsonData = V2TimFollowInfo.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2TimFollowTypeCheckResult) {
      fromJsonData = V2TimFollowTypeCheckResult.fromJson(json[&#39;data&#39;]) as T;
    } else if (T == V2TimPermissionGroupMemberInfoResult) {
      fromJsonData = V2TimPermissionGroupMemberInfoResult.fromJson(json[&#39;data&#39;]) as T;
    } else {
      fromJsonData = json[&#39;data&#39;] as T;
    }
  }

  code = json[&#39;code&#39;];
  desc = json[&#39;desc&#39;] ?? &#39;&#39;;
  data = fromJsonData;
}</code></pre>
</section>


  </div> <!-- /.main-content -->

  <div id="dartdoc-sidebar-left" class="sidebar sidebar-offcanvas-left">
    <!-- The search input and breadcrumbs below are only responsively visible at low resolutions. -->
<header id="header-search-sidebar" class="hidden-l">
  <form class="search-sidebar" role="search">
    <input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search...">
  </form>
</header>

<ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav">
    <li><a href="../../index.html">tencent_cloud_chat_sdk</a></li>
    <li><a href="../../web_compatible_models_v2_tim_value_callback/web_compatible_models_v2_tim_value_callback-library.html">v2_tim_value_callback</a></li>
    <li><a href="../../web_compatible_models_v2_tim_value_callback/V2TimValueCallback-class.html">V2TimValueCallback<span class="signature">&lt;<wbr><span class="type-parameter">T</span>&gt;</span></a></li>
    <li class="self-crumb">V2TimValueCallback.fromJson constructor</li>
</ol>


    <h5>V2TimValueCallback class</h5>
    <div id="dartdoc-sidebar-left-content"></div>
  </div><!--/.sidebar-offcanvas-left-->

  <div id="dartdoc-sidebar-right" class="sidebar sidebar-offcanvas-right">
  </div><!--/.sidebar-offcanvas-->

</main>

<footer>
  <span class="no-break">
    tencent_cloud_chat_sdk
      8.5.6864-beta.7
  </span>

  
</footer>



<script src="../../static-assets/highlight.pack.js?v1"></script>
<script src="../../static-assets/docs.dart.js"></script>



</body>

</html>

